/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author LYS
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmJournal extends BasicModel<PmJournal> {
  projectno?: string; // 项目编号
  ddate?: string; // 日期
  ctype?: string; // 打卡类型
}

export const pmJournalList = (params?: PmJournal | any) =>
  defHttp.get<PmJournal>({ url: adminPath + '/proj/journal/pmJournal/list', params });

export const pmJournalListData = (params?: PmJournal | any) =>
  defHttp.post<Page<PmJournal>>({ url: adminPath + '/proj/journal/pmJournal/listData', params });

export const pmJournalForm = (params?: PmJournal | any) =>
  defHttp.get<PmJournal>({ url: adminPath + '/proj/journal/pmJournal/form', params });

export const pmJournalSave = (params?: any, data?: PmJournal | any) =>
  defHttp.postJson<PmJournal>({ url: adminPath + '/proj/journal/pmJournal/save', params, data });

export const pmJournalDelete = (params?: PmJournal | any) =>
  defHttp.get<PmJournal>({ url: adminPath + '/proj/journal/pmJournal/delete', params });

export const pmJournalListCardData = (params?: PmJournal | any) =>
  defHttp.post<Page<PmJournal>>({ url: adminPath + '/proj/journal/pmJournal/listCardData', params });